.table {
    overflow-x: var(--table-view-overflow-x);
    overflow-y: hidden;
    max-height: inherit;
    position: relative;
}

.table[position="left"] {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    background: var(--table-view-table-background);
}

.table[position="left"][shadow] {
    box-shadow: var(--table-view-table-shadow);
}

.table[position="right"] {
    position: absolute;
    right: 0;
    top: 0;
    overflow: hidden;
    background: var(--table-view-table-background);
}

.table[position="right"][shadow] {
    box-shadow: var(--table-view-table-right-shadow);
}

.table[position="right"] > *,
.table[position="right"] .head-table {
    float: right;
}

.expand-td {
    background-color: #f9f9f9;
}
/**
 * 头部
 */
.head {
    width: 100%;
    overflow-x:hidden;
    overflow-y: hidden;
}
.head::-webkit-scrollbar {
    height: 0;
}

.head[stickingHead] {
    overflow: hidden;
    position: fixed;
    top: 0;
    z-index: 200;
    box-shadow: var(--table-view-table-top-shadow);
}

.headPlaceholder {
    width: 100%;
}

.head-title {
    position: relative;
}

.head-title[sortable]:hover {
    background: var(--table-view-head-title-sortable-hover);
    cursor: pointer;
}
.head-title[sortable]:hover .sort{
    color: var(--table-view-sort-color-hover);
}

.head-title.boldHeader {
    font-weight: bold;
}
.head-title[last-left-fixed]::after,
.head-title[first-right-fixed]::after{
    content: "";
    position: absolute;
    top: 0;
    left: 6px;
    bottom: -1px;
    width: 6px;
    pointer-events: none;
    transform: translateX(-100%);
    transition: box-shadow .1s linear;
    box-shadow: none;
    display:block;
}
.head-title[last-left-fixed]::after {
    left: unset;
    transform: translateX(100%);
    right: 6px;
}
.head-title[shadow][last-left-fixed]::after {
    box-shadow: inset -4px 0 5px -3px rgb(0 0 0 / 15%);
}
.head-title[shadow][first-right-fixed]::after {
    box-shadow: inset 3px 0 5px -3px rgb(0 0 0 / 15%);
}

.head-title[disabled] {
    color: var(--text-color-disabled);
    background-color: var(--table-view-expander-background-disabled);
}

.head-title[ellipsis] * {
    white-space: nowrap;
}
.head-title[ellipsis] div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.head-title[ellipsis] .column-title {
    max-width:100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}
.head-title[filterable][ellipsis]:not([sortable]) .column-title,
.head-title[sortable][ellipsis]:not([filterable]) .column-title {
    max-width: calc(100% - 20px);
}
.head-title[sortable][filterable][ellipsis] .column-title {
    max-width: calc(100% - 40px);
}
.head-title[ellipsis] .column-title + .sort,
.head-title[ellipsis] .column-title + .filter-wrap
 {
    vertical-align: middle;
}
/* 为了文字和排序按钮对齐 */
.head-title[ellipsis]::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 100%;
    vertical-align: middle;
}
.column-title {
    font-size: var(--table-view-head-item-size);
    color: var(--table-view-head-item-color);
}

/**
 * 行
 */
.row[selected],
.row[selected] td {
    background: var(--table-view-row-selected-background) !important;
}
.row[selected] td{
    box-shadow: inset 0px 1px 0px 0px var(--table-view-row-selected-border-color),
        inset 0px -1px 0px 0px var(--table-view-row-selected-border-color);
}
.row[selected] td:first-child{
    box-shadow: inset 0px 1px 0px 0px var(--table-view-row-selected-border-color),
        inset 0px -1px 0px 0px var(--table-view-row-selected-border-color),
        inset 1px 0px 0px 0px var(--table-view-row-selected-border-color);
}
.row[selected] td:last-child{
    box-shadow: inset 0px 1px 0px 0px var(--table-view-row-selected-border-color),
        inset 0px -1px 0px 0px var(--table-view-row-selected-border-color),
        inset -1px 0px 0px 0px var(--table-view-row-selected-border-color);
}
.row[draggable="true"] {
    cursor: var(--table-view-drag-cursor);
}
.row[dragging="true"] td {
    background: var(--table-view-row-background-dragging);
}
.row[dragging="true"][subrow] td {
    background: var(--table-view-subrow-background-dragging);
}
.row[selectable="true"] {
    cursor: pointer;
}

/**
 * 状态
 */
.center {
    text-align: center;
    color: #999 !important;
}
.centerSticky {
    padding: 0 !important;
}
.centerSticky .wrap {
    position: sticky;
    left: 0;
    overflow: hidden;
    padding: var(--table-view-td-padding);
}

/**
 * 排序icon
 */
.sort {
    position: relative;
    display: inline-block;
    width: var(--table-view-sort-size);
    height: var(--table-view-sort-size);
    vertical-align: -1px;
    color: var(--table-view-sort-color);
    cursor: var(--cursor-pointer);
    margin-left: 5px;
}
.sort::before {
    position: absolute;
    left: 0;
    top: -3px;
    line-height: 1;
content: "\e672";
    font-family: "lcap-ui-icons";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-decoration: inherit;
    text-rendering: optimizeLegibility;
    text-transform: none;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-smoothing: antialiased;
}
.sort::after {
    position: absolute;
    left: 0;
    bottom: -4px;
    line-height: 1;
content: "\e66c";
    font-family: "lcap-ui-icons";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-decoration: inherit;
    text-rendering: optimizeLegibility;
    text-transform: none;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-smoothing: antialiased;
}
.sort[sorting][order="asc"]::before {
    color: var(--table-view-sort-color-active);
}
.sort[sorting][order="desc"]::after {
    color: var(--table-view-sort-color-active);
}

/**
 * filters
 */
.filter-wrap {
    cursor: var(--cursor-pointer);
    padding-bottom: 6px;
    margin-bottom: -6px;
    color: var(--table-view-sort-color);
    margin-left: 5px;
}
.filter-wrap:hover{
    color: var(--table-view-filter-color-hover);
}
.filter-wrap::before {
content: "\e665";
    font-family: "lcap-ui-icons";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-decoration: inherit;
    text-rendering: optimizeLegibility;
    text-transform: none;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-smoothing: antialiased;
    color: inherit;
    font-size: var(--font-size-small);
}
.filter-wrap[active] {
    color: var(--table-view-filter-color-active);
}

/**
 * 调整列宽
 */
.resizer {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: -3px;
    z-index: 1;
    cursor: col-resize;
    padding: 2px;
    background: var(--border-color-base) content-box;
    width: 5px;
}
/** 避免拖拽的时候点击到排序 */
.resizer[draggable-source]::before {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    width: 100px;
    height: 100%;
}

/**
 * f-scroll-view 滚动相关
 */
.scrollcview {
    width: 100%;
    height: 100%;
}
.scrollcview[native="true"][hide-scroll] [class^="f-scroll-view_wrap__"]{
    overflow-x: hidden;
}
.scrollcview[native="true"][hide-scroll] [class^="f-scroll-view_wrap__"]::-webkit-scrollbar {
    width: 0;
}

/** fix 固定列滚动条看不见 */
.scrollcview [class^="f-scroll-view_wrap__"] {
    position: relative;
    z-index: 0;
}

.resizer {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: -3px;
    z-index: 1;
    cursor: col-resize;
    padding: 2px;
    background: var(--border-color-base) content-box;
    width: 5px;
}

.cell {
    position: relative;
    white-space: normal;
    word-break: break-all;
    /* 解决在火狐浏览器下英文换行显示问题 */
    word-wrap: break-word;
}

.cell[ellipsis] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell[ellipsis] > div:last-child { /*3091817581019904 还原回来*/
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell[ellipsis][tree-column="true"] > div:last-child {
    display: inline;  /* 3042948982240000 */
}
.cell[ellipsis] > * {
    white-space: nowrap;
}
.cell[ellipsis] > div > * {
    white-space: nowrap;
}
.cell[ellipsis] > div[class^="u-table-view_expander_expander__"] + div {
    width: calc(100% - var(--table-view-expander-size) - 3px);
    display: inline-flex;
    align-items: center;
}
.cell[ellipsis] > div[class^="u-table-view_expander_expander__"] + div > * {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cell[ellipsis] > div[class^="u-table-view_expander_expander__"] + * {
    margin-left: 3px;
}
.cell[last-left-fixed]::after,
.cell[first-right-fixed]::after{
    content: "";
    position: absolute;
    top: 0;
    left: 6px;
    bottom: -1px;
    width: 6px;
    pointer-events: none;
    transform: translateX(-100%);
    transition: box-shadow .1s linear;
    box-shadow: none;
    display:block;
}
.cell[last-left-fixed]::after {
    left: unset;
    transform: translateX(100%);
    right: 6px;
}
.cell[shadow][last-left-fixed]::after {
    box-shadow: inset -4px 0 5px -3px rgb(0 0 0 / 15%);
}
.cell[shadow][first-right-fixed]::after {
    box-shadow: inset 3px 0 5px -3px rgb(0 0 0 / 15%);
}

.cell[disabled] {
    color: var(--text-color-disabled);
    background-color: var(--table-view-expander-background-disabled);
}
.dragHandler {
    cursor: var(--table-view-drag-cursor);
}
.dragHandler[disabled] {
    cursor: var(--table-view-drag-cursor-disabled);
    color: var(--table-view-drag-color-disabled);
}

/**
 * 树型展示
 */
.tree_expander {
    display: inline-block;
    width: var(--table-view-tree-expander-size);
    height: var(--table-view-tree-expander-size);
    line-height: var(--table-view-tree-expander-size);
    transition: transform var(--transition-duration-base);
    margin-right: var(--table-view-tree-expander-margin);
    text-align: center;
    vertical-align: middle;
}
.tree_expander::before {
content: "\e679";
    font-family: "lcap-ui-icons";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-decoration: inherit;
    text-rendering: optimizeLegibility;
    text-transform: none;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-smoothing: antialiased;
}
.tree_expander {
    cursor: pointer;
}
.tree_expander[expanded] {
    transform: rotate(90deg);
}
.tree_placeholder{
    display: inline-block;
    width: var(--table-view-tree-expander-size);
    height: var(--table-view-tree-expander-size);
    line-height: var(--table-view-tree-expander-size);
    text-align: center;
    margin-right: var(--table-view-tree-expander-margin);
}
.tree_expander[loading]{
    margin-right: calc(4px + var(--table-view-tree-expander-margin));
}
.tree_expander[loading]::before {
    content: '';
    font: inherit;
    display: inline-block;
    width: var(--table-view-tree-expander-loading-size);
    height: var(--table-view-tree-expander-loading-size);
    border: var(--table-view-tree-expander-loading-border-width) solid currentColor;
    border-radius: var(--table-view-tree-expander-loading-size);
    animation: rotate var(--spinner-animation-duration) ease-in-out var(--spinner-animation-delay) infinite;
}
.tree_expander + div,
.tree_placeholder + div
{
    display: inline-flex;
    align-items: center;
    width: auto;
}
.tree_expander + div.editablewrap > div,
.tree_placeholder + div.editablewrap > div {
    width: 100%;
}
.tree_expander[loading]::before {
    border-top-color: transparent;
}

.indent {}

/**
 * 编辑列
 */
.editablewrap{
    display: table;
    width: 100%;
    height: 100%;
    table-layout: fixed;
    min-height: var(--table-view-editable-td-min-height);
}
.editablewrap > div {
    display: table-cell;
    vertical-align: middle;
}
.editablewrap[ellipsis] > div {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.editablewrap[ellipsis]:not([editing]) > div div {
    display: inline;
}

.column-field {}

.expand-content {

}
.expand-td {
    /* transition: $transition-duration height ease-in-out, $transition-duration padding-top ease-in-out, $transition-duration padding-bottom ease-in-out; */
    background-color: var(--table-view-expand-td-background);
}

/* 子表单特有 */
.table[allow-drop='true'] th[sub-form-drop-column]::after {
    background: rgba(78, 117, 236, 0.24) url('./assets/allow-drop.svg') center calc(100% - 8px) / 12px 12px no-repeat;
    border-color: #4E75EC;

}
.table[allow-drop='true'] td[sub-form-drop-column]::after {
    color: #4E75EC !important;
    background: rgba(78, 117, 236, 0.24);
    border-color: #4E75EC;
}


.table[allow-drop='false'] th[sub-form-drop-column]::after {
    background: #F5F5F5 url('./assets/forbid-drop.svg') center bottom / 16px 16px no-repeat;
    border: 1px solid #E5E5E5;
    border-bottom: 0;
}
.table[allow-drop='false'] td[sub-form-drop-column]::after {
    content: '';
    background: #F5F5F5;
    border: 1px solid #E5E5E5;
    border-top: 0;
}

th[sub-form-drop-column],
td[sub-form-drop-column] {
    border-bottom: 0 !important;
    z-index: 88 !important;
}
th[sub-form-drop-column] *,
td[sub-form-drop-column] * {
    display: none !important;
}
th[sub-form-drop-column]::after,
td[sub-form-drop-column]::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: #F7F8FA;
    box-sizing: border-box;
    border: 1px dashed #A9AEB8;
    pointer-events: none;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    color: #777777;
    z-index: 999;
}
th[sub-form-drop-column]::after {
    background: url('./assets/drop.svg') center calc(100% - 8px) / 12px 12px no-repeat;
    border-bottom: 0;
}
td[sub-form-drop-column]::after {
    content: '从组件库拖拽组件添加';
    border-top: 0;
}


